package com.gexing.jsondemo.ui;

import java.util.ArrayList;

public class Person extends BaseModel {

	private String name;
	private int age;
	private long id;
	private boolean is_student;
	private ArrayList<String> card_name;
	private Car car;

	public Person(String name, int age, long id, boolean is_student, ArrayList<String> card_name, Car car) {
		super();
		this.name = name;
		this.age = age;
		this.id = id;
		this.is_student = is_student;
		this.card_name = card_name;
		this.car = car;
	}

	@Override
	public String getGenericsTypeName(String key) {
		if (key.equals("card_name")) {
			return BeanUtils.CLASSNAME_STRING;
		} else if (key.equals("comments")) {
			return "com.gexing.model.Comment";
		} else {
			return null;
		}
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public int getAge() {
		return age;
	}

	public void setAge(int age) {
		this.age = age;
	}

	public long getId() {
		return id;
	}

	public void setId(long id) {
		this.id = id;
	}

	public boolean isIs_student() {
		return is_student;
	}

	public void setIs_student(boolean is_student) {
		this.is_student = is_student;
	}

	public ArrayList<String> getCard_name() {
		return card_name;
	}

	public void setCard_name(ArrayList<String> card_name) {
		this.card_name = card_name;
	}

	public Car getCar() {
		return car;
	}

	public void setCar(Car car) {
		this.car = car;
	}

	@Override
	public String toString() {
		return "Person [name=" + name + ", age=" + age + ", id=" + id + ", is_student=" + is_student + ", card_name=" + card_name + ", car=" + car
				+ "]";
	}

}
